<?php
/**
 * Created by PhpStorm.
 * User: harlen
 * Date: 2017/2/10 0010
 * Time: 20:27
 */

namespace app\admin\controller;

use app\admin\model\AdPos as AdPosModel;

class Ad extends BaseController
{
    //显示所有广告
    public function index()
    {
        return $this->fetch();
    }
    //显示广告位列表
    public function pos()
    {
        $list = AdPosModel::paginate(20);
        $this->assign([
            'list' => $list,
            'page' => $list->render(),
        ]);

        return $this->fetch('pos/index');
    }
    //添加广告位
    public function posAdd()
    {

    }
}